If murder was clearly a sin, why did god have to put it in the Ten Commandments? Couldn't they as a society just decide that murder was wrong? In Cain's case, could he really have known the effects of what he did if he was the first murderer?
A good portion of Genesis is god gettin mad at humans for doing things they didn't know were wrong. Consider the pre-flood world (as if it actually existed..) god gave humankind zero instructions that we know of, zero guidance. Then, once they weren't up to his standards... Rather than teach or discipline them and make himself known, he just condemned them all. Even the animals. What did the animals do?
If your children acted out and were bad because you completely ignored them their whole lives, would you be justified in killing them all? Regardless of how wicked they might become... Not only is it your own fault, but it is quite another thing to consider wiping them all out along with their pets.
Jus' sayin.